{// 引入标签库 }
<tagLib name="html" />
{// 加载头部公共文件 }
<include file="Public:top" />
<!-- 菜单区域  -->

<!-- 主页面开始 -->
<div id="main" class="" >

<!-- 主体内容  -->
<div class="content" >
<!--<div class="title">————安全预警信息管理————</div>-->
<!--  功能操作区域  -->
<div class="operate" >
<html:imageBtn name="add" value="新增" click="add()" style="impBtn hMargin fLeft shadow" />
<html:imageBtn name="edit" value="编辑" click="edit()" style="impBtn hMargin fLeft shadow" />
<!--<html:imageBtn name="saveExcel" value="导出" click="saveExcel()" style="impBtn hMargin fLeft shadow" />-->
<html:imageBtn name="delete" value="删除" click="foreverdel()" style="impBtn hMargin fLeft shadow" />
<eq name="Think.session.dwid" value="0">
    <html:imageBtn name="lockAll" value="全锁" click="lockAll(0)" style="impBtn hMargin fLeft shadow" />
    <html:imageBtn name="unlockAll" value="全解" click="lockAll(1)" style="impBtn hMargin fLeft shadow" />
</eq>
<!--<html:imageBtn name="foreverdel" value="永久删除" click="foreverdel()" style="impBtn hMargin fLeft shadow small" />-->
<div class="title1">[安全预警信息管理]</div>
<!-- 查询区域 -->
<div class="fRig">
<form method='post' action="__URL__">
<div class="fLeft"><span id="key"><input type="text" name="keyword" title="单位查询" class="medium" ></span></div>
<div class="fLeft">
<SELECT class="medium bLeft"  name="status2" title="处理状态">
	<option value="">处理状态</option>
	<option value="0">未处理</option>
    <option value="1">已处理</option>
</SELECT> 
</div>
<html:imageBtn type="submit" name="search" value="查询" style="impBtn hMargin fLeft shadow" />
</div>
<!-- 高级查询区域 -->
<div  id="searchM" class=" none search cBoth" >
</div>
</form>
</div>
<!-- 功能操作区域结束 -->
<style>
#table1 td{margin-bottom:10px; margin-top:10px; height:30px;}
#table1{margin:10px;}
#showText{ padding:11px 10px;}
</style>
<!-- 列表显示区域  -->
<div class="list" >
<html:list id="checkList" name="aqyj" style="list" checkbox="true" action="true" datasource="list" key="true" show="dwmc:单位名称|130px,title:预警标题:edit,alertDate|toDate='Y-m-d':预警日期,preDay:预警(天),alertDate|getDif=$aqyj['preDay']:相距(天),status|getStatus:状态|30px" actionlist="edit:编辑,status|showStatus=$aqyj['id'],status2|showStatus2=$aqyj['id']" />
</div>
<!--  分页显示区域 -->
<div class="page">{$page}</div>
<!-- 列表显示区域结束 -->
</div>
<!-- 主体内容结束 -->
</div>
<!-- 主页面结束 -->
<include file="Public:footer" />
<div class="hide" style="height:100%" id="hideDiv">
	<div id="dlg_remarks2" class="dlg">
    	<div id="showText">请将安全预警提示中警示内容处理完成之后填写此内容。</div>
    	<div id="div_remarks2" class="dlg1"></div>
    </div>
  	<div id="tempDiv"></div>   
</div>
<div class="hide">
<div id="showExcelDiv">
<form method="post" id="form2" name="form2">
<table class="" style="width:600px" align="center" id="table1">

<tr><Td class="tLeft" colspan="6">表格标题：<input type="text" class="huge bLeft" value="" id="t_title" /></Td></tr>



<tr>
  <Td class="tLeft" colspan="6">Exlce版本：<input name="eType" type="radio" value="Excel5" checked="checked" />2003版本<input name="eType" type="radio" value="Excel2007" />2007版本</Td></tr>
</table>
</form>
<!--导出excel的模块名，这个要写在form2之外-->
<input name="modelName" id="modelName" type="hidden" value="vst" />
</div>
</div>
<script>
var editor;
jQuery(function(){
	var myDate = new Date();
	$('#t_title').val(myDate.getFullYear()+'年香洲区学校安全预警信息一览表')
})
function proYj(id){
	ff = 'remarks2';
	sf = '学校安全预警信息';
	
	$('#dlg_'+ff).unbind().dialog({
			onOpen:function(){
				$('html').addClass('hidescroll');},
			onClose:function(){
				$('html').removeClass('hidescroll');
				if(editor){ 
					
				}
			},
			modal:true,title:sf+"查看修改对话框",width:windowW,height:windowH,maximizable:true,resizable:true,
			buttons:[{
				text:'保存',iconCls:'icon-ok',
				handler:function(){
					if(!editor){ $('#dlg_'+ff).dialog('close');}
					//$('#'+ff).html(editor.html());	
					$.post("__URL__/updateYj/",{id:id,remarks2:editor.html()},function(data){
						$.messager.show({title:'提示信息',msg:data.info,timeout:2000,showType:'slide'});
						if(data.status){ $('#dlg_'+ff).dialog('close');}
					}//function
					,"json");//post	
				}
			},{
				text:'关闭',handler:function(){
					$('#dlg_'+ff).dialog('close');
				}
			}]
		});	
		//不足5个字符时直接显示编辑器
		if($('#div_'+ff).html().length<25){
			editor = showEditor(ff,0,495);
		}else{
			jQuery('#dlg_'+ff).one('dblclick',function(){
				editor = showEditor(ff,0,495);
			})
		}
		//先将remarks2的内容读取出来
		$.post('__URL__/myGetField/',{id:id,f:ff},function(d){
			editor.html(d.data);
		},'json')
}
function showProYj(id){
	ff = 'remarks2';
	sf = '学校安全预警信息';
	
	$('#dlg_'+ff).unbind().dialog({
			onOpen:function(){
				$('html').addClass('hidescroll');},
			onClose:function(){
				$('html').removeClass('hidescroll');
				if(editor){ 
					
				}
			},
			modal:true,title:sf+"查看修改对话框",width:windowW,height:windowH,maximizable:true,resizable:true,
			buttons:[{
				text:'保存',iconCls:'icon-ok',
				handler:function(){
					if(!editor){ $('#dlg_'+ff).dialog('close');}
					//$('#'+ff).html(editor.html());	
					$.post("__URL__/updateYj/",{id:id,remarks2:editor.html()},function(data){
						$.messager.show({title:'提示信息',msg:data.info,timeout:2000,showType:'slide'});
						if(data.status){ $('#dlg_'+ff).dialog('close');}
					}//function
					,"json");//post	
				}
			},{
				text:'关闭',handler:function(){
					$('#dlg_'+ff).dialog('close');
				}
			}]
		});	
		//不足5个字符时直接显示编辑器
		if($('#div_'+ff).html().length<25){
			editor = showEditor(ff,0,495);
		}else{
			jQuery('#dlg_'+ff).one('dblclick',function(){
				editor = showEditor(ff,0,495);
			})
		}
		//先将remarks2的内容读取出来
		$.post('__URL__/myGetField/',{id:id,f:ff},function(d){
			editor.html(d.data);
		},'json')
}
</script>